#include <iostream>

#include "Package.h"
#include "TwoDayPackage.h"

using std::cout;
using std::endl;


TwoDayPackage::TwoDayPackage( double tax, double w, double c,
        char* fName, char* fAddress, char* fCity, char* fState, char* fZIP,
        char* tName, char* tAddress, char* tCity, char* tState, char* tZIP ) :
    Package( w, c, fName, fAddress, fCity, fState, fZIP,
             tName, tAddress, tCity, tState, tZIP )
{
    _tax = tax > 0 ? tax : 1.0; // 0% de taxa
}

TwoDayPackage::~TwoDayPackage()
{
}

double TwoDayPackage::getTax() const
{
    return _tax;
}

double TwoDayPackage::calculateCost() const
{
    return getTax() * Package::calculateCost();
}

void TwoDayPackage::printCost() const
{
    cout << "Cost from Two Day Package:" << endl;
    cout << "Cost: R$ " << calculateCost() << endl << endl;
}

